<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateCollistDatasTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('collist_datas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('collist_id')->default(0)->nullable()->unsigned()->comment('栏目列表ID');
            $table->integer('data_type')->default(0)->unsigned()->comment('数据类型');
            $table->integer('data_id')->default(0)->nullable()->unsigned()->comment('数据ID');
            $table->string('icon', 191)->nullable()->comment('栏目ICON');
            $table->string('onclick')->nullable()->comment('onclick');
            $table->string('data')->nullable()->comment('data');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('collist_datas');
    }
}
